﻿@model UscSunShine.Mvc.Models.EditUserDepartmentViewModel
@{
    ViewBag.Title = "用户详情";
}

<h2>用户详情</h2>

<div>
    <h4>用户</h4>
    <hr />
    <dl class="dl-horizontal ">
        <dt>
            @Html.DisplayNameFor(model => model.UserName)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.UserName)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.Email)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Email)
        </dd>
    </dl>
</div>
<h4>该用户所在的部门：</h4>
@if (ViewBag.DepartmentNames.Count == 0)
{
    <hr />
    <p>这个用户没有设置角色</p>
}
<table class="table">
    @foreach (var item in ViewBag.DepartmentNames)
    {
        <tr>
            <td>
                @item
            </td>
        </tr>
    }
</table>
<p>
    @Html.ActionLink("编辑", "Edit", new { id = Model.Id }, new { @class="btn btn-warning"}) |
    @Html.ActionLink("返回列表", "Index")
</p>